/*
 * Created by Christopher King
 * Copyright (C) 2007 Christopher King, All Rights Reserved.
 */

package us.cirion.adventure.engine;

/**
 * GameDisplay describes the contract that a UI must fulfill in order to serve
 * as the front-end for the game engine. The adventure games can run in any
 * system that supports these operations.
 * 
 * @author Chris
 */
public interface GameDisplay
{

	/**
	 * Present this textual information to the user.
	 * 
	 * @param message A message to display.
	 */
	public void displayMessage(String message);

	/**
	 * Finish the game, either exiting the application or returning to a main
	 * menu.
	 */
	public void endGame();

	/**
	 * Persist the game state. The implementer can use {@link Game#writeObject}
	 * to capture the game data. Games can be saved to local files, record
	 * stores, over the network, or somewhere else. This action may display a
	 * confirmation or provide the opportunity to name a saved game on some
	 * devices; on others, a single save game slot may be used.
	 */
	public void saveGame();

	/**
	 * Loads the game data. The implementer can use {@link Game#readObject} to
	 * load the game data. The user interface may automatically load from a
	 * particular slot, or may present the user with a confirmation or a menu of
	 * available games to load.
	 */
	public void loadGame();

	/**
	 * Starts a new game. This may restart the current game, or could return to
	 * a main menu where the player can select a game and options.
	 */
	public void newGame();

}
